package trb.complexshield.bool.model;

import no.hrp.hvrc.utils.j3d.BBox;
import no.hrp.hvrc.utils.j3d.Mat4;
import no.hrp.hvrc.utils.j3d.Vec3;

public class BoolBox {

    public final Vec3 lower = new Vec3();
    public final Vec3 upper = new Vec3();
    public final Mat4 l2w = new Mat4();

    public BoolBox(Vec3 lower, Vec3 upper, Mat4 l2w) {
        this.lower.set(lower);
        this.upper.set(upper);
        this.l2w.set(l2w);
    }

    public static BoolBox fromCenterAndSize(Vec3 center, Vec3 size, Mat4 l2w) {
        BBox bbox = BBox.fromCenterAndSize(center, size);
        return new BoolBox(bbox.getLower(), bbox.getUpper(), l2w);
    }
}
